package com.cainiao.stock.api;

import com.cainiao.stock.entity.StockBusiness;
import com.cainiao.stock.response.PageResult;
import com.cainiao.stock.response.ResponseResult;
import com.cainiao.stock.vo.*;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.io.IOException;
import java.util.List;


@RequestMapping("/api/quot")
public interface StockControllerAPI {

    @GetMapping("/stock/updown")
    ResponseResult<StockUpDownVO> stockUpdown();

    @GetMapping("/stock/tradevol")
    ResponseResult<TradevolVO> tradevol();

    @GetMapping("/stock/export")
    void export(@RequestParam("page") Integer page, @RequestParam("pageSize") Integer pageSize, HttpServletResponse httpServletResponse) throws IOException;

    @GetMapping("/stock/updown/count")
    ResponseResult<UpdownVO> upDown();

    @GetMapping("/stock/all")
    ResponseResult<PageResult<MoreVO>> more(@RequestParam("page")Integer page, @RequestParam("pageSize")Integer pageSize);


    @GetMapping("/index/all")
    ResponseResult<List<InnerMarketVO>> innerIndexAll();

    @GetMapping("/stock/business/all")
    ResponseResult<List<StockBusiness>> getList();

    /**
     *需求说明: 沪深两市板块分时行情数据查询，以交易时间和交易总金额降序查询，取前10条数据
     * @return
     */
    @GetMapping("/sector/all")
    ResponseResult<List<StockBlockRtInfoVO>> sectorAll();

    /**
     * 沪深两市个股涨幅分时行情数据查询，以时间顺序和涨幅查询前10条数据
     * @return
     */
    @GetMapping("/stock/increase")
    ResponseResult<List<StockRtInfoVO>> stockIncreaseLimit();
}
